package com.rockwell.sniffyhunter.utils;

import com.rockwell.sniffyhunter.model.MazeWallAligner;

public enum MazeWallAlignerState implements IStateMachine {
	START {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).start();
		}
	},
	CHECK_FRONT_WALL_PRESENT {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).checkFrontWallPresent();
		}
	},
	MOVE_FORWARD {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).moveForward();
		}
	},
	CHECK_ALIGN_FRONT_DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).checkAlignFrontDone();
		}
	},
	ALIGN_FRONT {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).alignFront();
		}
	},
	REVERSE_BEFORE_ALIGN_SIDE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).reverseBeforeAlignSide();
		}
	},
	CHECK_ALIGN_SIDE_DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).checkAlignSideDone();
		}
	},
	ALIGN_SIDE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).alignSide();
		}
	},
	REVERSE_DUE_TO_ROBOT_PROTRUDING {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).reverseDueToRobotProtruding();
		}
	},
	CHECK_REVERSE_DUE_TO_ROBOT_PROTRUDING_DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return ((MazeWallAligner)stateObject).checkReverseDueToRobotProtrudingDone();
		}
	},
	DONE {
		@Override
		public
		IStateMachine doAction(IStateObject stateObject) {
			return START;
		}
	};
}
